<div class="form">
    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'article-form',
        'enableAjaxValidation' => false,
            ));
    ?>
    <?php echo $form->errorSummary($model); ?>
    <fieldset>
        <legend>新闻信息</legend>
        <table cellspacing="0" cellpadding="0" class="Ftable">
            <tr>
                <th width="150"><?php echo $form->labelEx($model, 'title'); ?></th>
                <td><?php echo $form->textField($model, 'title', array('size' => 60, 'maxlength' => 128)); ?></td>
            </tr>
            <div class="row">
                <th><?php echo $form->labelEx($model, 'category_id'); ?></th>
                <td><?php echo $form->dropDownList($model, 'category_id', NewsCategory::model()->getCategories()); ?></td>
            </div>
            <tr>
                <th><?php echo $form->labelEx($model, 'status'); ?></th>
                <td><?php echo $form->dropDownList($model, 'status', Lookup::items('NewsStatus')); ?></td>
            </tr>
            <tr>
                <th><?php echo $form->labelEx($model, 'content'); ?></th>
                <td>
                    <?php
                    $this->widget('application.extensions.tinymce.ETinyMce', array(
                        'model' => $model, 
                        'attribute' => 'content',
                        'useSwitch' => false,
                        'editorTemplate' => 'full'
                    ));
                    ?>
                </td>
            </tr>
            <tr>
                <th><?php echo $form->labelEx($model, 'tags'); ?></th>
                <td>
                    <?php echo $form->textField($model, 'tags', array('size' => 30, 'maxlength' => 56)); ?>
                    <span>多个词组组成,英文逗号分隔开,如: 标签1,标签2,标签3</span>
                </td>
            </tr>
            <tr>
                <th></th>
                <td><?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?></td>
            </tr>
        </table>
    </fieldset>
    <?php $this->endWidget(); ?>
</div>